package com.boarsoft.boar.batch.demo.flow;

import java.io.RandomAccessFile;
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.beans.factory.annotation.Autowired;

import com.boarsoft.boar.batch.demo.entity.Demo1;
import com.boarsoft.boar.batch.demo.util.ByteString;
import com.boarsoft.boar.batch.demo.util.ToBigDecimal;
import com.boarsoft.flow.core.bean.ProcessHandler;
import com.boarsoft.hibernate.biz.SimpleBizImpl;
import com.boarsoft.hibernate.dao.SimpleDao;

public class DemoFlowBatchProcess1 extends SimpleBizImpl implements ProcessHandler {
	@Autowired
	protected SimpleDao dao;

	/**
	 * 截断表，准备测试
	 */
	@Override
	public Object process(String entry, Object data, Throwable throwable) throws Throwable {
		System.out.println("process1线程号：" + Thread.currentThread().getId());
//		dao.executeSql("truncate table demo1");
//		dao.executeSql("truncate table demo1_1");
//		dao.executeSql("select 1");
		log.info("hello process1");
		return data;
	}

}
